// asserts/component/groups/common/course-detail/course-detail.js
import {post} from "../../../../js/request";
var app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    oriData: Object
  },

  /**
   * 组件的初始数据
   */
  data: {
  },

  /**
   * 组件的方法列表
   */
  methods: {
    videoPlay: function(e){
      if(!this.properties.oriData.isHomeWork){
        return
      }

      post("finishHomework", {
        courseId: this.properties.oriData.courseId,
        studentId: app.globalData.studentInfo.studentId
      }).then(data => {
        console.log("作业完成")
      })
    }
  }
})
